<script lang="ts" setup>
  import zhCN from 'ant-design-vue/es/locale/zh_CN'
  import enGB from 'ant-design-vue/es/locale/en_GB'
  import { ConfigProvider as AConfigProvider } from 'ant-design-vue'
  import { useAppStore } from '@/store'
  const appStore = useAppStore()
  const locales: {
    [key: string | number]: object
  } = {
    zh: zhCN,
    en: enGB,
  }
//   const locale = ref()
  const locale = zhCN
//   watchEffect(() => {
//     locale.value = locales[appStore.locale]
//   })
</script>

<template>
  <a-config-provider :locale="locale">
    <router-view />
  </a-config-provider>
</template>

<style>
  #app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
  }
</style>
